<template>
	<div class="t">
		Test => {{$store.state.test.amount}}
    <h1>{{$route.query.userId}}</h1>
    <el-button type="success" @click="$store.commit('test/add')">成功按钮</el-button>
    <el-button type="danger" @click="onName">跳转登录</el-button>
	</div>
</template>

<script>
export default {
  transition: 'page',
  components: {
  },
  data(){
  	return{
      name:'我是假的'
    }
  },
  methods:{
    onName(){
      console.log(1)
      this.$router.push({
        path: "/login"
      });
    },
    async requestData(){
      const url = 'http://api.douban.com/v2/movie/top250?start=1&count=10';
      let { data } = await this.$axios.get('linetest/v2/movie/top250?start=1&count=10')
      console.log(data)
      return { users: data.data }
    },
  },
  created(){
    this.requestData();
  }
}
</script>

<style scoped>
@import url("../assets/css/pages/login.css");
</style>